 var fjPre = basePath+'/pr/fjPre.jsp';//点击方剂出条文界面
 //var plusminus = basePath+'/pr/plusminus.jsp';
 //iframe.jsp
 var plusminus = basePath+'/pr/iframepm.jsp';
 var similarPrescription = basePath+'/pr/similarPrescription.jsp';
var avgDosage = basePath+'/tra/avgDosage.jsp';
var convertPrescriptionUrl = basePath+'/pr/convertPrescription.jsp';
var prHCAnalyzeOne_URL = basePath+'/pr/iframehc.jsp';
 var prOnePan = new Ext.Panel({
        plain:true,
       // renderTo:'prOnePan',
       // autoHeight:true,
       
        tbar:[new Ext.Button({text:' 原 文 ',handler:function(){ 
        	//this.setDisabled(true);
        	//	alert('原文');
        		prOnePanLoad(fjPre,{fjId:fjId});
        	 }}),
        	new Ext.Button({text:'剂量折算',cls:'',handler:function(){ 
        	//this.setDisabled(true);
      		prOnePanLoad(convertPrescriptionUrl,{fjId:fjId});
        	
        	 }}),
        	new Ext.Button({text:' 结构分析 ',handler:function(){
        	//alert('寒热分析');
        	prOnePanLoad(prHCAnalyzeOne_URL,{fjId:fjId});
        	
        	}}),
        	new Ext.Button({text:' 加减分析 ',handler:function()
        		{
        		//alert('加减分析');
        		prOnePanLoad(plusminus,{fjId:fjId});
        		}}),
        	new Ext.Button({text:' 相似组成方 ',handler:function(){
        	//alert('相似组成方');
        	prOnePanLoad(similarPrescription,{fjId:fjId});
        	
        	}})],
        	defaults:{autoScroll: true,autoHeight: true},
            autoLoad:{url: fjPre, params:{fjId:fjId},scripts:true},
	        region: 'center',     // center region is required, no width/height specified
			contentEl: "prOnePan",
	        autoScroll:true,
	        split:true,
	        layout: 'fit'
		});
		
	var myBorderPanel = new Ext.Panel({
    renderTo: "content_div_ii",
    width: '100%',
    height : Ext.get("content_div_ii").getHeight(),
    layout: 'border',
    monitorResize:true,
		split: true, 
    items: [{
        region: 'north',     // position for region
		contentEl: "north_div",
        height: 100,
        split:true,// enable resizing
        minSize: 75,         // defaults to 50 
        maxSize: 150,
        autoScroll:true,
        collapsible: true
       
    	},prOnePan]
	});

	function prOnePanLoad(url,p){
		prOnePan.load({
	    url: url,
	    params: p, // or a URL encoded string
	    discardUrl: false,
	    nocache: false,
	    text: "装载...",
	    timeout: 30,
	    scripts: true
		});
	}
	
	///中药id
	var herId = 0;
	var menu_measure = new Ext.menu.Menu({
       items : [{
           id:'pr_Menu',
           text : "平均计量",
           iconCls: 'edit',
           handler:function (node){
          	 prOnePanLoad(avgDosage,{herId:herId});
          }
       }]
    });
    function PrHermenu(e,id){
        herId = id;
      
	    var xy = new Array();
	    var   isIE   =   document.all?true:false;
	 
	      if   (!isIE)   {  
	        xy[0] = e.pageX;
		    xy[1]= e.pageY;
	      }  
	      if (isIE)   {  
	 		xy[0] = e.clientX;
		    xy[1]= e.clientY;
	      }
	    if(menu_measure)
        	menu_measure.showAt(xy);
    }